/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package botlab.control;

import botlab.command.SeekCommand;
import com.jme3.math.Vector3f;
import com.jme3.scene.Spatial;
import com.jme3.scene.control.Control;

/**
 *
 * @author sebastien
 */
public class VehiculeControl extends BaseControl {

    private CommandControl cc;
    private SeekCommand sc;

    public VehiculeControl(Vector3f target, float maxSpeed) {
        sc = new SeekCommand(target, maxSpeed);
        cc = new CommandControl();
    }

    @Override
    protected void controlUpdate(float tpf) {
        cc.setCommand(sc);
    }

    @Override
    public Control cloneForSpatial(Spatial spatial) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
